package com.book.notice.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName("notice")
public class Notice {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("message")
    private String message;

    @TableField("status")
    private String status;

    @TableField("messagestatus")
    private String messagestatus;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "createtime",fill = FieldFill.INSERT)
    private Date createtime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "updatetime",fill = FieldFill.INSERT_UPDATE)
    private Date updatetime;
}
